/**
 * api接口统一管理
 */
import { get, post } from './http'

//登录短信
export const smsLogin = p => post('v1/manage/sms/login', p)

//登录
export const login = p => post('/v1/manage/sysUser/login', p)

//数据推送
export const ADDPUSH = p => post('/v1/push/add', p)
export const PUSHLIST = p => post('/v1/push/list', p)
export const DELETEPUSH = p => post('/v1/push/delete', p)
export const CLOSEPUSH = p => post('/v1/push/close', p)
export const ACTIVEPUSH = P => post('/v1/push/active', P)
export const UPDATEPUSH = P => post('/v1/push/update', P)

//首页个人信息、修改密码、修改手机号
export const USERINFO = P => post('/v1/manage/sysUser/currentUser', P) //获取用户信息
export const SMSMODIFYMOBILE = P => post('/v1/manage/sms/modifyMobile', P) //修改手机发送验证码
export const MODIFYMOBILE = P => post('/v1/manage/sysUser/modifyMobile', P) //修改手机执行
export const MODIFYPASS = P => post('/v1/manage/sysUser/modifyPwd', P) //修改密码
export const SMSFORGET = P => post('/v1/manage/sms/forgetPwd', P) //忘记密码 发送短信
export const RESETPWD = P => post('/v1/manage/sysUser/resetPwd', P) //忘记密码 执行
 

// 列表用户
export const listUser = p => get('/v1/manage/sysUser/list', p)

//分页获取所有的url数据
export const listUrl = p => get('/v1/manage/display/list', p)

//编辑url数据
export const updateUrl = p => post('/v1/manage/display/update', p)

//增加url数据
export const addUrl = p => post('/v1/manage/display/add', p)

//删除url数据
export const delUrl = p => post('/v1/manage/display/del', p)

// 产线讯息
export const line = p => get('/v1/manage/display/getLine', p)

//GET /v1/manage/sysUser/foxCoreList
export const MANAGERS = p => get('/v1/manage/sysUser/foxCoreList', p)
//aml用户管理
export const LISTAMLUSER = p => post('/v1/manage/sysUser/listAmlUser', p)
export const DELETEAMLUSER = p => get('/v1/manage/sysUser/deleteAmlUser', p)
export const AML_USER_DETAIL = p => post('/v1/manage/sysUser/amlUserDetail', p)

//商城用户管理
export const LISTSHOPUSER = p => post('/v1/manage/sysUser/listShopUser', p)
export const AUTHSHOPUSER = p => post('/v1/manage/sysUser/authShopUser', p)
export const DELETESHOPUSER = p => post('/v1/manage/sysUser/deleteShopUser', p)
export const UPDATESHOPUSER = p => post('/v1/manage/sysUser/updateShopUser', p)
export const FOX_USER_LIST = p => get('/v1/manage/sysUser/foxCoreList', p)
export const LOCK_SHOP_USER = p => post('/v1/manage/sysUser/lockShopUser', p)


export const info = p => get('/v1/manage/sysUser/info', p)
export const getMobileById = p => get('/v1/manage/sysUser/getMobileById', p)
export const getMobile = p => get('/v1/manage/sysUser/getMobile', p)
export const listALI = p => get('/v1/manage/sysUser/listAll', p)
export const UPDATE_MANAGER = p => post('/v1/manage/sysUser/update', p)
export const LOCK_MANAGER_PWD = p => post('/v1/manage/sysUser/lock', p)
export const ADD_MANAGER = p => post('/v1/manage/sysUser/add', p)
export const ASSIGN_ROLE = p => post('/v1/manage/sysUserRole/add', p)
export const UPDATE_USER_ROLE = p => post('/v1/manage/sysUserRole/update', p)

export const ALL_MENUS = p => get('/v1/manage/sysRes/list', p)

export const ADD_CHILD_MENU = p => post('/v1/manage/sysRes/addChildren', p)
export const ADD_ROOT_MENU = p => post('/v1/manage/sysRes/addParent', p)
export const UPDATE_MENU = p => post('/v1/manage/sysRes/update', p)
export const DELETE_MENU = p => post('/v1/manage/sysRes/delete', p)
export const LIST_BY_ROLE = p => get('/v1/manage/sysRes/listByRole', p)

export const ROLES = p => get('/v1/manage/sysRole/list', p)
export const UPDATE_ROLE = p => post('/v1/manage/sysRole/update', p)
export const UPDATE_ROLE_RES = p => post('/v1/manage/sysRole/updateRes', p)
export const ADD_ROLE = p => post('/v1/manage/sysRole/add', p)
export const UPDATE_ROLE_STATE = p => post('/v1/manage/sysRole/updateState', p)
export const GET_MENUS_BY_ROLE = p => get('/v1/manage/sysRes/listRoleTree', p)
export const ASSIGN_PERMISSIONS = p => post('/v1/manage/sysRole/updateRes', p)
export const FOX_ROLE_LIST = p => get('/v1/manage/sysRole/foxCoreList', p)

//物料
export const PRODUCT_LIST = p => post('v1/product/list', p)
export const PRODUCT_ADD = p => post('v1/product/add', p)
export const PRODUCT_UPDATE = p => post('v1/product/update', p)
export const PRUDUCT_DETAIL = p => post('/v1/product/detail',p)
export const PRODUCT_BATCHDELETE = p => post('/v1/product/delete', p)
export const PRODUCT_MODIFY_PRICE = p => post('/v1/product/modifyPrice', p)
export const PRODUCT_LOWER_SHELF = p => post('/v1/product/lowerShelf', p)
export const PRODUCT_UPPER_SHELF = p => post('/v1/product/upperShelf', p)
export const LIST_BY_PRODUCT_CODE = p => get('/v1/product/listByProductCode', p)
export const IN_OUT_STORE = p => get('/v1/product/inOutStore', p)

//料号
export const LIAOHAO_LIST = p => get('v1/liaohao/list', p)
export const LIAOHAO_ADD = p => post('v1/liaohao/add', p)
export const LIAOHAO_UPDATE = p => post('v1/liaohao/update', p)
export const LIAOHAO_LIAOHAOLIST = p => get('v1/liaohao/liaohaoList', p) //仓库管理
export const LIAOHAO_INOUTSTORE = p => get('v1/liaohao/inOutStore', p) //仓库管理出入库
export const LIAOHAO_batchModifyPrice = P =>
  post('/v1/liaohao/batchModifyPrice', P) //批量修改料号价格
export const LIAOHAO_batchDelte = P => post('/v1/liaohao/batchDelete', P) //批量修改料号价格
export const UPDATE_PDF = P => post('v1/product/updateSpecsBook', P) //上传规格书

//日志
export const OPERATE_LIST = p => get('v1/operate/list', p)

//补料
export const GET_SINGLE_PRODUCT = p => get('v1/liaohao', p) // 查询料号
export const PRODUCT_MAKEUP_LIST = p => get('v1/product/makeup/list', p)
export const PRODUCT_MAKEUP_MY_LIST = p => get('v1/product/makeup/myList', p)
export const PRODUCT_MAKEUP_APPLY = p => post('v1/product/makeup/apply', p)
export const PRODUCT_MAKEUP_AGREE = p => post('v1/product/makeup/agree', p)
export const PRODUCT_MAKEUP_REFUSE = p => post('v1/product/makeup/refuse', p)
export const PRODUCT_MAKEUP_LISTBYMENU = p =>get('v1/product/makeup/listByMenu', p)
export const UPDATE_PRODUCT_FILE = p =>post('v1/product/updateProductFile', p)



//图片文档
export const PRODUCT_IMAGE_FILE = p => post('v1/file/image/product', p)
export const PRODUCT_PDF_FILE = p => post('v1/file/pdf/product', p)

export const ORDER_AGREE = p => post('v1/order/agree', p)
export const ORDER_REFUSE = p => post('v1/order/refuse', p)
export const ORDER_CONFIRM_CHANGE = p => post('/v1/order/confirmChange', p)
export const ORDER_CONFIRM_RECEIVE = p => post('/v1/order/confirmReceive', p)

//订单详情
export const ORDER_CART_LIST = p => get('v1/orderCart/list', p)

//发送信息
export const MSG_DIALOG = p => get('v1/foxMessage/listDialog', p)
export const MSG_LIST = p => get('v1/foxMessage/list', p)
export const MSG_ADD = p => post('v1/foxMessage/add', p)

//文档下载
export const ORDER_DOWNLOAD = p => post('v1/download/order', p)
export const ORDER_DOWNLOADAPPLY = p => post('v1/download/apply', p)
export const PRODUCT_DOWNLOAD = p => post('v1/download/produce', p)
export const LIAOHAO_DOWNLOAD = p => post('v1/download/liaohao', p)
export const MAKEUP_DOWNLOAD = p => post('/v1/download/makeup', p)
export const CHAT_DOWNLOAD = p => post('v1/download/chat', p)
export const APPLY_DOWNLOAD = p => post('v1/download/apply', p)

//"订单应收款审批(订单)"
export const RECEIPT_DOWNLOAD = p => post('/v1/download/receipt', p)
//"财务销售报表(订单)"
export const SALE_DOWNLOAD = p => post('/v1/download/sale', p)
//"商城订单配送管理(订单)"
export const ORDER_DELIVERY_DOWNLOAD = p => post('/v1/download/orderDelivery', p)
//"退换货申请（订单）"
export const REPLACE_DOWNLOAD = p => post('/v1/download/replace', p)
//"订单评价管（订单）"
export const EVALUATE_DOWNLOAD = p => post('/v1/download/evaluate', p)
//"规格分析(订单)"
export const SPECIFICATION_DOWNLOAD = p => post('/v1/download/specification', p)

//供应商管理
export const SUPPLIER_ALLLIST = p => get('v1/menu/listAll', p)
export const MENU_LIST_SELECT = p => get('v1/menu/listSelect', p)
export const SUPPLIER_LIST = p => get('v1/menu/list', p)
export const SUPPLIER_ADD = p => post('v1/menu/add', p)
export const MENU_DELETE = p => post('v1/menu/delete', p)
export const SUPPLIER_UPDATE = p => post('v1/menu/update', p)
export const AMLBINDNENU = p => post('v1/manage/sysUserRole/amlBindMenu', p)

//物料分类
export const CATEGORY_LIST = p => get('v1/category/list', p)
export const CATEGORY_LISTF = p => post('v1/category/listF', p)

export const CATEGORY_ADD = p => post('v1/category/add', p)
export const CATEGORY_DEL = p => post('v1/category/delete', p)

export const CATEGORY_UPDATE = p => post('v1/category/update', p)
export const CATEGORY_CHILD_LIST = p => post('/v1/category/listZ', p)
//样品申请
export const SAMPLE_MY_LIST = p => get('v1/sample/myList', p)
export const SAMPLE_MAINLIST = p => get('v1/sample/mainList', p) //运营样品列表
export const SAMPLE_RECORDLISTBYMAINID = p =>get('v1/sample/recordListByMainId', p) //运营样品列表分表
export const SAMPLE_BIND_EXPRESS_NUM = p =>get('v1/sample/bindExpressNum', p)


export const MENUINFOBYLIAOHAO = p => post('v1/liaohao/menuInfoByLiaohao', p) //确认订单
export const REPLYLIST = p => get('v1/order/replyByUni', p)
export const SPEC_ANALYSIS = p => post('/v1/order/specAnalysis', p)
export const ORDER_MAIN_LIST = p => post('/v1/order/mainList', p)
export const ORDER_PRODUCT_LIST = p => post('/v1/order/productList', p)
export const ORDER_FINANCE_SUM = p => post('/v1/order/financeSum', p)
export const ORDER_CONFIRM_SEND = p => post('/v1/order/confirmSend', p)

//2020-09-03 jsw
export const PRODUCTAPPLY = p => post('/v1/product/apply', p)
export const PRODUCTAUDIT = p => post('/v1/product/audit', p) //批量申请


// export const SURECONFIRM = p => post('api/adminConfirm', p);// 财务订单详情下的确认订单
